import { useState } from 'react'
import { MenuComponents } from './Components'
import { Route, Navigate , Routes } from 'react-router-dom'
import { routes } from './routers/routers'
import './App.scss'

function App() {

  return (
    <div className="App">
      <MenuComponents />
      <div className="content">
        <Routes>
          <Route path='/' element={<Navigate to={routes[0].path} />} />
          {routes.map(R => (
            <Route key={R.path} path={R.path} element={<R.component />} />
          ))}
        </Routes>
      </div>
    </div>
  )
}

export default App
